<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>小练习1-JS进阶（一）</title>
    </head>
    <body>
        <pre>
            <code>
                    // 小练习 1：请分析下面这段代码执行过程中，执行上下文栈的情况，并写出执行过程和结果：

                    function foo(i) {
                        if (i < 0) {
                            return;
                        }
                        console.log('begin:' + i);
                        foo(i - 1);
                        console.log('end:' + i);
                    }

                    foo(5);
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/p_1.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>
</html>